from sys import argv

name_count = len(argv[1:])
greet = "World"

if name_count == 1:
    greet = argv[1]
elif name_count > 1:
    greet = "%s, and %s" % (', '.join(argv[1:-1]), argv[-1])

print "Hello, %s!" % greet
